import java.util.Arrays;

public class StringTest {
    public static void main(String[] args) {
        String str = "hello word!!";

        //getBytes
        //System.out.println(Arrays.toString(str.getBytes()));
        //replace
        //System.out.println(str.replace("l","d"));
        System.out.println(str.toCharArray());
        System.out.println(Arrays.toString(str.split(" ")));
        System.out.println(str.trim());
        System.out.println(str.charAt(5));
        System.out.println(str.indexOf("ll"));
        System.out.println(str.endsWith("!0"));
        System.out.println(" last:"+str.lastIndexOf("!"));
        System.out.println("early:" + str.indexOf("!"));
        System.out.println(str.contains("ll"));
        System.out.println(str.equalsIgnoreCase("hello WOrd!"));
        System.out.println("hjy is handsome".replace("hjy","zhangliang"));
        System.out.println("hjy is handsome".toCharArray()[1]);
        System.out.println("http://asdasdqwr.com".substring(10));


    }
}
